<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" %>

/**
 * 业务数据初始化
 */
$(function(){
	
	$("#saveButton").find("a").click(function(){ 
		if($("#docSuperviseBranchForm").form('validate')){
			$.ajax({//ajax保存表单基本信息
				   type: "POST",
				   url: "<c:url value='/superviseBranch/alterBranch' />",
				   data: $('#docSuperviseBranchForm').serialize(),
				   dataType: "json",
				   async:false,
				   success: function(msg){
				     if(msg.state=="200"){
				    	 closeBranchDetails("<c:out value='${index}' />");
				     }else{
				    	 $.messager.alert("提示",'数据保存失败');
				     }
				   }
				});
		}
	});
	
	$("#cancelButton").find("a").click(function(){ 
		closeBranchDetails();
	});
});